﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="物资收发存统计表.aspx.cs" Inherits="syc.Store.报表.物资收发存统计表" %>
<%@ Import Namespace="NPOI.HSSF.UserModel" %>
<%@ Import Namespace="NPOI.HPSF" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Configuration" %>
<html>
<head runat="server">
    <title></title>
</head>
<body>
<script runat="server">
    protected double 油管本期销售量;
    protected double 套管本期销售量;
    protected double 油管本年销售量;
    protected double 套管本年销售量;
    //保护器
    protected double 套管螺纹保护器本期购进;
    protected double 套管螺纹保护器本期累计购进;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.NianDu.SelectedValue = DateTime.Today.Year.ToString();
            this.YueFen.SelectedValue = DateTime.Today.Month.ToString();
            year = this.NianDu.SelectedValue;
            month = this.YueFen.SelectedValue;
        }
        Button_Query_Click(null, null);
    }
    protected void Year_SelectedIndexChanged(object sender, EventArgs e)
    {

    }

    protected void Month_SelectedIndexChanged(object sender, EventArgs e)
    {

    }

    protected void Button_Query_Click(object sender, EventArgs e)
    {
        SqlConnection Conn = new SqlConnection();
        Conn.ConnectionString = ConfigurationManager.ConnectionStrings["SCMConnectionString1"].ConnectionString;
        Conn.Open();
        SqlCommand Cmd = new SqlCommand();
        Cmd.Connection = Conn;

        //本期结存
        string sql0 = @"select dbo.产品本期结存(@年度,@月份,1,0),dbo.产品本期结存(@年度,@月份,2,0),dbo.产品本期结存(@年度,@月份,4,0)";
        sql0 = sql0.Replace("@年度", this.NianDu.Text);
        sql0 = sql0.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql0;
        SqlDataReader Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管本期结存 = Reader.GetDouble(0);
            套管本期结存 = Reader.GetDouble(1) + Reader.GetDouble(2);            
        }
        Reader.Close();
        //本期发出
        string sql1 = @"select dbo.产品本期发出(@年度,@月份,1,0),dbo.产品本期发出(@年度,@月份,2,0),dbo.产品本期发出(@年度,@月份,4,0)";
        sql1 = sql1.Replace("@年度", this.NianDu.Text);
        sql1 = sql1.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql1;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管本期发货 = Reader.GetDouble(0);
            套管本期发货 = Reader.GetDouble(1) + Reader.GetDouble(2); 
        }
        Reader.Close();
        //本期入库
        string sql2 = @"select dbo.产品本月实际产量(@年度,@月份,1),dbo.产品本月实际产量(@年度,@月份,2),dbo.产品本月实际产量(@年度,@月份,6)";
        sql2 = sql2.Replace("@年度", this.NianDu.Text);
        sql2 = sql2.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql2;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管本期入库 = double.Parse(Reader.GetDecimal(0).ToString());
            套管本期入库 = double.Parse(Reader.GetDecimal(1).ToString()) + double.Parse(Reader.GetDecimal(2).ToString());       
        }
        Reader.Close();
        //上期结存
        油管上期结存 = 油管本期结存 + 油管本期发货 - 油管本期入库;
        套管上期结存 = 套管本期结存 + 套管本期发货 - 套管本期入库;   
        //本期入库累计
        string sql3 = @"select dbo.产品某月止累计(@年度,@月份,1),dbo.产品某月止累计(@年度,@月份,2),dbo.产品某月止累计(@年度,@月份,6)";
        sql3 = sql3.Replace("@年度", this.NianDu.Text);
        sql3 = sql3.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql3;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {        
            油管本期入库累计 = double.Parse(Reader.GetDecimal(0).ToString());
            套管本期入库累计 = double.Parse(Reader.GetDecimal(1).ToString()) + double.Parse(Reader.GetDecimal(2).ToString());       
        }
        Reader.Close();
        //本期发出累计
        string sql4 = @"select dbo.产品本期发出累计(@年度,@月份,1,0),dbo.产品本期发出累计(@年度,@月份,2,0),dbo.产品本期发出累计(@年度,@月份,4,0)";
        sql4 = sql4.Replace("@年度", this.NianDu.Text);
        sql4 = sql4.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql4;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管本期发货累计 = Reader.GetDouble(0);
            套管本期发货累计 = Reader.GetDouble(1) + Reader.GetDouble(2);           
        }
        Reader.Close();

        //原料
        //油管料
        string sql5 = @"            
             select dbo.原料期初库存(@年度,@月份,1) as 期初库存,dbo.原料本期收入(@年度,@月份,1) as 本期收入,dbo.原料本期发出(@年度,@月份,1) as 本期发出,dbo.原料期末库存(@年度,@月份,1) as 期末库存,dbo.原料本年累计收入(@年度,@月份,1),dbo.原料本年累计发出(@年度,@月份,1)";
        sql5 = sql5.Replace("@年度", this.NianDu.Text);
        sql5 = sql5.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql5;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管料期初库存 = Reader.GetDouble(0);
            油管料本期外购量 = Reader.GetDouble(1);
            油管料本期消耗量 = Reader.GetDouble(2);
            油管料期末库存 = Reader.GetDouble(3);
            油管料本期外购量累计 = Reader.GetDouble(4);
            油管料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //套管料
        string sql6 = @"            
            select dbo.原料期初库存(@年度,@月份,2) as 期初库存,dbo.原料本期收入(@年度,@月份,2) as 本期收入,dbo.原料本期发出(@年度,@月份,2) as 本期发出,dbo.原料期末库存(@年度,@月份,2) as 期末库存,dbo.原料本年累计收入(@年度,@月份,2),dbo.原料本年累计发出(@年度,@月份,2)";
        sql6 = sql6.Replace("@年度", this.NianDu.Text);
        sql6 = sql6.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql6;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            套管料期初库存 = Reader.GetDouble(0);
            套管料本期外购量 = Reader.GetDouble(1);
            套管料本期消耗量 = Reader.GetDouble(2);
            套管料期末库存 = Reader.GetDouble(3);
            套管料本期外购量累计 = Reader.GetDouble(4);
            套管料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //套管N80料
        string sqlN80 = @"            
            select dbo.原料期初库存(@年度,@月份,102) as 期初库存,dbo.原料本期收入(@年度,@月份,102) as 本期收入,dbo.原料本期发出(@年度,@月份,102) as 本期发出,dbo.原料期末库存(@年度,@月份,102) as 期末库存,dbo.原料本年累计收入(@年度,@月份,102),dbo.原料本年累计发出(@年度,@月份,102)";
        sqlN80 = sqlN80.Replace("@年度", this.NianDu.Text);
        sqlN80 = sqlN80.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sqlN80;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            套管N80料期初库存 = Reader.GetDouble(0);
            套管N80料本期外购量 = Reader.GetDouble(1);
            套管N80料本期消耗量 = Reader.GetDouble(2);
            套管N80料期末库存 = Reader.GetDouble(3);
            套管N80料本期外购量累计 = Reader.GetDouble(4);
            套管N80料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //油管接箍料
        string sql7 = @"            
            select dbo.原料期初库存(@年度,@月份,3) as 期初库存,dbo.原料本期收入(@年度,@月份,3) as 本期收入,dbo.原料本期发出(@年度,@月份,3) as 本期发出,dbo.原料期末库存(@年度,@月份,3) as 期末库存,dbo.原料本年累计收入(@年度,@月份,3),dbo.原料本年累计发出(@年度,@月份,3)";
        sql7 = sql7.Replace("@年度", this.NianDu.Text);
        sql7 = sql7.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql7;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            油管接篐料期初库存 = Reader.GetDouble(0);
            油管接篐料本期外购量 = Reader.GetDouble(1);
            油管接篐料本期消耗量 = Reader.GetDouble(2);
            油管接篐料期末库存 = Reader.GetDouble(3);
            油管接篐料本期外购量累计 = Reader.GetDouble(4);
            油管接篐料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //套管接箍料
        string sql8 = @"            
                select dbo.原料期初库存(@年度,@月份,4) as 期初库存,dbo.原料本期收入(@年度,@月份,4) as 本期收入,dbo.原料本期发出(@年度,@月份,4) as 本期发出,dbo.原料期末库存(@年度,@月份,4) as 期末库存,dbo.原料本年累计收入(@年度,@月份,4),dbo.原料本年累计发出(@年度,@月份,4)";
        sql8 = sql8.Replace("@年度", this.NianDu.Text);
        sql8 = sql8.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql8;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            套管接篐料期初库存 = Reader.GetDouble(0);
            套管接篐料本期外购量 = Reader.GetDouble(1);
            套管接篐料本期消耗量 = Reader.GetDouble(2);
            套管接篐料期末库存 = Reader.GetDouble(3);
            套管接篐料本期外购量累计 = Reader.GetDouble(4);
            套管接篐料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //套管接箍料
        string sql9 = @"            
                select dbo.原料期初库存(@年度,@月份,104) as 期初库存,dbo.原料本期收入(@年度,@月份,104) as 本期收入,dbo.原料本期发出(@年度,@月份,104) as 本期发出,dbo.原料期末库存(@年度,@月份,104) as 期末库存,dbo.原料本年累计收入(@年度,@月份,104),dbo.原料本年累计发出(@年度,@月份,104)";
        sql9 = sql9.Replace("@年度", this.NianDu.Text);
        sql9 = sql9.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql9;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            套管N80接篐料期初库存 = Reader.GetDouble(0);
            套管N80接篐料本期外购量 = Reader.GetDouble(1);
            套管N80接篐料本期消耗量 = Reader.GetDouble(2);
            套管N80接篐料期末库存 = Reader.GetDouble(3);
            套管N80接篐料本期外购量累计 = Reader.GetDouble(4);
            套管N80接篐料本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //成品套管接箍J55
        string sql10 = @"            
                select dbo.原料期初库存(@年度,@月份,6) as 期初库存,dbo.原料本期收入(@年度,@月份,6) as 本期收入,dbo.原料本期发出(@年度,@月份,6) as 本期发出,dbo.原料期末库存(@年度,@月份,6) as 期末库存,dbo.原料本年累计收入(@年度,@月份,6),dbo.原料本年累计发出(@年度,@月份,6)";
        sql10 = sql10.Replace("@年度", this.NianDu.Text);
        sql10 = sql10.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql10;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            成品套管接箍期初库存 = Reader.GetDouble(0);
            成品套管接箍本期外购量 = Reader.GetDouble(1);
            成品套管接箍本期消耗量 = Reader.GetDouble(2);
            成品套管接箍期末库存 = Reader.GetDouble(3);
            成品套管接箍本期外购量累计 = Reader.GetDouble(4);
            成品套管接箍本期消耗量累计 = Reader.GetDouble(5);
        }
        Reader.Close();
        //自产       
        string sql11 = @"            
                select dbo.自产接箍期初库存(@年度,@月份,2) as 期初库存,dbo.自产接箍本期收入(@年度,@月份,2)+dbo.自产接箍本期收入(@年度,@月份,4) as 本期收入,dbo.自产接箍本期发出(@年度,@月份,2) as 本期发出,dbo.自产接箍期末库存(@年度,@月份,2) as 期末库存,dbo.自产接箍本期累计收入(@年度,@月份,2)+dbo.自产接箍本期累计收入(@年度,@月份,4),dbo.自产接箍本年累计发出(@年度,@月份,106)";
        sql11 = sql11.Replace("@年度", this.NianDu.Text);
        sql11 = sql11.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql11;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            自产套管接箍期初库存 = Reader.GetInt32(0);
            自产套管接箍本期外购量 = Reader.GetInt32(1);
            自产套管接箍本期消耗量 = Reader.GetInt32(2);
            自产套管接箍期末库存 = Reader.GetInt32(3);
            自产套管接箍本期外购量累计 = Reader.GetInt32(4);
            自产套管接箍本期消耗量累计 = Reader.GetInt32(5); 
        }
        Reader.Close();
        string sql12 = @"            
                select dbo.自产接箍期初库存(@年度,@月份,1) as 期初库存,dbo.自产接箍本期收入(@年度,@月份,1) as 本期收入,dbo.自产接箍本期发出(@年度,@月份,1) as 本期发出,dbo.自产接箍期末库存(@年度,@月份,1) as 期末库存,dbo.自产接箍本期累计收入(@年度,@月份,1),dbo.自产接箍本年累计发出(@年度,@月份,6)";
        sql12 = sql12.Replace("@年度", this.NianDu.Text);
        sql12 = sql12.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql12;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            自产油管接箍期初库存 = Reader.GetInt32(0);
            自产油管接箍本期外购量 = Reader.GetInt32(1);
            自产油管接箍本期消耗量 = Reader.GetInt32(2);
            自产油管接箍期末库存 = Reader.GetInt32(3);
            自产油管接箍本期外购量累计 = Reader.GetInt32(4);
            自产油管接箍本期消耗量累计 = Reader.GetInt32(5);
        }
        Reader.Close();

        string sql13 = @"            
                select dbo.[自产保护器本期收入](@年度,@月份,2),dbo.[自产保护器本期累计收入](@年度,@月份,2)";
        sql13 = sql13.Replace("@年度", this.NianDu.Text);
        sql13 = sql13.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql13;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            套管螺纹保护器本期购进 = Reader.GetDouble(0);
            套管螺纹保护器本期累计购进 = Reader.GetDouble(1);         
        }
        Reader.Close();
        
        string sql22 = @" 
               declare @油管本期销售量 float
               declare @套管本期销售量 float  
               declare @油管本年销售量 float
               declare @套管本年销售量 float                   
       
               select @油管本期销售量=isnull(sum(油管销售量),0) from 销售量 where 年份=@年度 and 月份=@月份 
               select @套管本期销售量=isnull(sum(套管销售量),0) from 销售量 where 年份=@年度 and 月份=@月份                                                    
               select @油管本年销售量=isnull(sum(油管销售量),0) from 销售量 where 年份=@年度 and 月份 between 1 and @月份 
               select @套管本年销售量=isnull(sum(套管销售量),0) from 销售量 where 年份=@年度 and 月份 between 1 and @月份    
                                                    
               select @油管本期销售量,@套管本期销售量,@油管本年销售量,@套管本年销售量
               ";
        sql22 = sql22.Replace("@年度", NianDu.Text);
        sql22 = sql22.Replace("@月份", this.YueFen.Text);
        Cmd.CommandText = sql22;
        Reader = Cmd.ExecuteReader();

        if (Reader.Read())
        {
            油管本期销售量 = Reader.GetDouble(0);
            套管本期销售量 = Reader.GetDouble(1);
            油管本年销售量 = Reader.GetDouble(2);
            套管本年销售量 = Reader.GetDouble(3);         
        }
        Reader.Close();
        Reader.Dispose();
        Cmd.Dispose();
        Conn.Dispose();
    }
    protected void WriteToFile()
    {
        Response.ContentType = "application/ms-excel";
        Response.AddHeader("content-disposition", "attachment; filename=\"" + DateTime.Now.ToShortDateString() + ".xls\"");
        hssfworkbook.Write(Response.OutputStream);
    }

    protected void InitializeWorkbook()
    {

        FileStream file = new FileStream(HttpContext.Current.Server.MapPath("/Store/报表/模板/主要物资收发存统计表.xls"), FileMode.Open, FileAccess.Read);

        hssfworkbook = new HSSFWorkbook(file);

        DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
        dsi.Company = "物资收发存统计表";
        hssfworkbook.DocumentSummaryInformation = dsi;

        SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
        si.Subject = "报表";
        si.Title = "物资收发存统计表";
        hssfworkbook.SummaryInformation = si;
    }
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        InitializeWorkbook();
        HSSFSheet sheet1 = hssfworkbook.GetSheet("物资收发存统计");
        Button_Query_Click(null, null);
        sheet1.GetRow(3).GetCell(3).SetCellValue(套管料期初库存);
        sheet1.GetRow(3).GetCell(4).SetCellValue(套管料本期外购量);
        sheet1.GetRow(3).GetCell(5).SetCellValue(套管料本期外购量累计);
        sheet1.GetRow(3).GetCell(6).SetCellValue(套管料本期消耗量);
        sheet1.GetRow(3).GetCell(7).SetCellValue(套管料本期消耗量累计);
        sheet1.GetRow(3).GetCell(8).SetCellValue(套管料期末库存);

        sheet1.GetRow(4).GetCell(3).SetCellValue(套管接篐料期初库存);
        sheet1.GetRow(4).GetCell(4).SetCellValue(套管接篐料本期外购量);
        sheet1.GetRow(4).GetCell(5).SetCellValue(套管接篐料本期外购量累计);
        sheet1.GetRow(4).GetCell(6).SetCellValue(套管接篐料本期消耗量);
        sheet1.GetRow(4).GetCell(7).SetCellValue(套管接篐料本期消耗量累计);
        sheet1.GetRow(4).GetCell(8).SetCellValue(套管接篐料期末库存);

        sheet1.GetRow(5).GetCell(3).SetCellValue(套管N80料期初库存);
        sheet1.GetRow(5).GetCell(4).SetCellValue(套管N80料本期外购量);
        sheet1.GetRow(5).GetCell(5).SetCellValue(套管N80料本期外购量累计);
        sheet1.GetRow(5).GetCell(6).SetCellValue(套管N80料本期消耗量);
        sheet1.GetRow(5).GetCell(7).SetCellValue(套管N80料本期消耗量累计);
        sheet1.GetRow(5).GetCell(8).SetCellValue(套管N80料期末库存);

        sheet1.GetRow(6).GetCell(3).SetCellValue(套管N80接篐料期初库存);
        sheet1.GetRow(6).GetCell(4).SetCellValue(套管N80接篐料本期外购量);
        sheet1.GetRow(6).GetCell(5).SetCellValue(套管N80接篐料本期外购量累计);
        sheet1.GetRow(6).GetCell(6).SetCellValue(套管N80接篐料本期消耗量);
        sheet1.GetRow(6).GetCell(7).SetCellValue(套管N80接篐料本期消耗量累计);
        sheet1.GetRow(6).GetCell(8).SetCellValue(套管N80接篐料期末库存);

        sheet1.GetRow(7).GetCell(3).SetCellValue(油管料期初库存);
        sheet1.GetRow(7).GetCell(4).SetCellValue(油管料本期外购量);
        sheet1.GetRow(7).GetCell(5).SetCellValue(油管料本期外购量累计);
        sheet1.GetRow(7).GetCell(6).SetCellValue(油管料本期消耗量);
        sheet1.GetRow(7).GetCell(7).SetCellValue(油管料本期消耗量累计);
        sheet1.GetRow(7).GetCell(8).SetCellValue(油管料期末库存);

        sheet1.GetRow(8).GetCell(3).SetCellValue(油管接篐料期初库存);
        sheet1.GetRow(8).GetCell(4).SetCellValue(油管接篐料本期外购量);
        sheet1.GetRow(8).GetCell(5).SetCellValue(油管接篐料本期外购量累计);
        sheet1.GetRow(8).GetCell(6).SetCellValue(油管接篐料本期消耗量);
        sheet1.GetRow(8).GetCell(7).SetCellValue(油管接篐料本期消耗量累计);
        sheet1.GetRow(8).GetCell(8).SetCellValue(油管接篐料期末库存);

        sheet1.GetRow(11).GetCell(4).SetCellValue(套管螺纹保护器本期购进);
        sheet1.GetRow(11).GetCell(5).SetCellValue(套管螺纹保护器本期累计购进);

        sheet1.GetRow(12).GetCell(3).SetCellValue(成品套管接箍期初库存);
        sheet1.GetRow(12).GetCell(4).SetCellValue(成品套管接箍本期外购量);
        sheet1.GetRow(12).GetCell(5).SetCellValue(成品套管接箍本期外购量累计);
        sheet1.GetRow(12).GetCell(6).SetCellValue(成品套管接箍本期消耗量);
        sheet1.GetRow(12).GetCell(7).SetCellValue(成品套管接箍本期消耗量累计);
        sheet1.GetRow(12).GetCell(8).SetCellValue(成品套管接箍期末库存);


        sheet1.GetRow(13).GetCell(3).SetCellValue(成品套管N80接箍期初库存);
        sheet1.GetRow(13).GetCell(4).SetCellValue(成品套管N80接箍本期外购量);
        sheet1.GetRow(13).GetCell(5).SetCellValue(成品套管N80接箍本期外购量累计);
        sheet1.GetRow(13).GetCell(6).SetCellValue(成品套管N80接箍本期消耗量);
        sheet1.GetRow(13).GetCell(7).SetCellValue(成品套管N80接箍本期消耗量累计);
        sheet1.GetRow(13).GetCell(8).SetCellValue(成品套管N80接箍期末库存);

        sheet1.GetRow(14).GetCell(3).SetCellValue(自产套管接箍期初库存);
        sheet1.GetRow(14).GetCell(4).SetCellValue(自产套管接箍本期外购量);
        sheet1.GetRow(14).GetCell(5).SetCellValue(自产套管接箍本期外购量累计);
        sheet1.GetRow(14).GetCell(6).SetCellValue(自产套管接箍本期消耗量);
        sheet1.GetRow(14).GetCell(7).SetCellValue(自产套管接箍本期消耗量累计);
        sheet1.GetRow(14).GetCell(8).SetCellValue(自产套管接箍期末库存);

        sheet1.GetRow(15).GetCell(3).SetCellValue(自产油管接箍期初库存);
        sheet1.GetRow(15).GetCell(4).SetCellValue(自产油管接箍本期外购量);
        sheet1.GetRow(15).GetCell(5).SetCellValue(自产油管接箍本期外购量累计);
        sheet1.GetRow(15).GetCell(6).SetCellValue(自产油管接箍本期消耗量);
        sheet1.GetRow(15).GetCell(7).SetCellValue(自产油管接箍本期消耗量累计);
        sheet1.GetRow(15).GetCell(8).SetCellValue(自产油管接箍期末库存);

      

        sheet1.GetRow(18).GetCell(3).SetCellValue(套管上期结存);
        sheet1.GetRow(18).GetCell(5).SetCellValue(套管本期入库);
        sheet1.GetRow(18).GetCell(6).SetCellValue(套管本期入库累计);
        sheet1.GetRow(18).GetCell(7).SetCellValue(套管本期发货);
        sheet1.GetRow(18).GetCell(8).SetCellValue(套管本期发货累计);
        sheet1.GetRow(18).GetCell(9).SetCellValue(套管本期销售量);
        sheet1.GetRow(18).GetCell(10).SetCellValue(套管本年销售量);
        sheet1.GetRow(18).GetCell(11).SetCellValue(套管本期结存);
        
        sheet1.GetRow(19).GetCell(3).SetCellValue(油管上期结存);
        sheet1.GetRow(19).GetCell(5).SetCellValue(油管本期入库);
        sheet1.GetRow(19).GetCell(6).SetCellValue(油管本期入库累计);
        sheet1.GetRow(19).GetCell(7).SetCellValue(油管本期发货);
        sheet1.GetRow(19).GetCell(8).SetCellValue(油管本期发货累计);
        sheet1.GetRow(19).GetCell(9).SetCellValue(油管本期销售量);
        sheet1.GetRow(19).GetCell(10).SetCellValue(油管本年销售量);
        sheet1.GetRow(19).GetCell(11).SetCellValue(油管本期结存);

        sheet1.GetRow(20).GetCell(3).SetCellValue(套管上期结存 + 油管上期结存);
        sheet1.GetRow(20).GetCell(5).SetCellValue(套管本期入库 + 油管本期入库);
        sheet1.GetRow(20).GetCell(6).SetCellValue(套管本期入库累计 + 油管本期入库累计);
        sheet1.GetRow(20).GetCell(7).SetCellValue(套管本期发货 + 油管本期发货);
        sheet1.GetRow(20).GetCell(8).SetCellValue(套管本期发货累计 + 油管本期发货累计);
        sheet1.GetRow(20).GetCell(9).SetCellValue(套管本期销售量 + 油管本期销售量);
        sheet1.GetRow(20).GetCell(10).SetCellValue(套管本年销售量 + 油管本年销售量);
        sheet1.GetRow(20).GetCell(11).SetCellValue(套管本期结存+油管本期结存);

        WriteToFile();
        Response.End();
    }

</script>
    <form id="form1" runat="server">
       <script type="text/javascript" language="javascript" src="/common.js"></script>
    <div id="wintop" class="wintop">物资库存明细</div>
    <asp:Panel ID="Panel" runat="server" CssClass="panel">
       年份：<asp:DropDownList ID="NianDu" runat="server" 
                >               
                <asp:ListItem>2010</asp:ListItem>
                <asp:ListItem>2011</asp:ListItem>
                <asp:ListItem>2012</asp:ListItem>
                <asp:ListItem>2013</asp:ListItem>
                <asp:ListItem>2014</asp:ListItem>
                <asp:ListItem>2015</asp:ListItem>
                <asp:ListItem>2016</asp:ListItem>
                <asp:ListItem>2017</asp:ListItem>
            </asp:DropDownList>
       &nbsp;月份：<asp:DropDownList ID="YueFen" runat="server" AutoPostBack="True" 
               >
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
            </asp:DropDownList>
      <asp:Button ID="Button_Query"
            runat="server" Text="查看报表" CssClass="button" UseSubmitBehavior="true" onclick="Button_Query_Click"  Visible="false"
             />&nbsp;
             <asp:Button ID="Button_Save" runat="server" CssClass="button" 
            onclick="Button_Save_Click" Text="导 出" UseSubmitBehavior="False" />
        </asp:Panel>
      <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>
    <div>
    <style>
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
@page
	{margin:.7in .75in 1.0in .65in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-page-orientation:landscape;}
tr
	{mso-height-source:auto;
	mso-ruby-visibility:none;}
col
	{mso-width-source:auto;
	mso-ruby-visibility:none;}
br
	{mso-data-placement:same-cell;}
.style0
	{mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	white-space:nowrap;
	mso-rotate:0;
	mso-background-source:auto;
	mso-pattern:auto;
	color:windowtext;
	font-size:12.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	border:none;
	mso-protection:locked visible;
	mso-style-name:常规;
	mso-style-id:0;}
td
	{mso-style-parent:style0;
	padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:windowtext;
	font-size:12.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
.xl24
	{mso-style-parent:style0;
	text-align:center;
	border:.5pt solid windowtext;}
.xl25
	{mso-style-parent:style0;
	border:.5pt solid windowtext;}
.xl26
	{mso-style-parent:style0;
	font-size:10.0pt;
	text-align:center;
	border:.5pt solid windowtext;}
.xl27
	{mso-style-parent:style0;
	font-size:10.0pt;
	mso-number-format:"\@";
	text-align:center;
	border:.5pt solid windowtext;}
.xl28
	{mso-style-parent:style0;
	font-size:11.0pt;
	border:.5pt solid windowtext;}
.xl29
	{mso-style-parent:style0;
	font-size:11.0pt;
	text-align:center;
	border:.5pt solid windowtext;}
.xl30
	{mso-style-parent:style0;
	font-size:11.0pt;
	text-align:left;
	border:.5pt solid windowtext;}
.xl31
	{mso-style-parent:style0;
	font-size:11.0pt;
	text-align:center;
	border:.5pt solid windowtext;
	white-space:normal;}
.xl32
	{mso-style-parent:style0;
	font-size:9.0pt;
	text-align:center;
	border:.5pt solid windowtext;}
.xl33
	{mso-style-parent:style0;
	font-size:9.0pt;
	text-align:center;
	border:.5pt solid windowtext;}
.xl34
	{mso-style-parent:style0;
	font-size:9.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:.5pt solid windowtext;}
.xl35
	{mso-style-parent:style0;
	font-size:9.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl36
	{mso-style-parent:style0;
	font-size:9.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:.5pt solid windowtext;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl37
	{mso-style-parent:style0;
	font-size:18.0pt;
	text-align:center;}
.xl38
	{mso-style-parent:style0;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:none;
	border-left:none;}
ruby
	{ruby-align:left;}
rt
	{color:windowtext;
	font-size:9.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	mso-char-type:none;
	display:none;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>物资收发存统计</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:Print>
      <x:ValidPrinterInfo/>
      <x:PaperSizeIndex>9</x:PaperSizeIndex>
      <x:HorizontalResolution>600</x:HorizontalResolution>
      <x:VerticalResolution>600</x:VerticalResolution>
     </x:Print>
     <x:Selected/>
     <x:TopRowVisible>6</x:TopRowVisible>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>22</x:ActiveRow>
       <x:ActiveCol>3</x:ActiveCol>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
   <x:ExcelWorksheet>
    <x:Name>Sheet2</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
   <x:ExcelWorksheet>
    <x:Name>Sheet3</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>8100</x:WindowHeight>
  <x:WindowWidth>12780</x:WindowWidth>
  <x:WindowTopX>360</x:WindowTopX>
  <x:WindowTopY>90</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>

<body link=blue vlink=purple>

<table x:str border=0 cellpadding=0 cellspacing=0 width=981 style='border-collapse:
 collapse;table-layout:fixed;width:737pt'>
 <col width=148 style='mso-width-source:userset;mso-width-alt:4736;width:111pt'>
 <col width=80 style='mso-width-source:userset;mso-width-alt:2560;width:60pt'>
 <col width=29 style='mso-width-source:userset;mso-width-alt:928;width:22pt'>
 <col width=60 style='mso-width-source:userset;mso-width-alt:1920;width:45pt'>
 <col width=69 style='mso-width-source:userset;mso-width-alt:2208;width:52pt'>
 <col width=68 style='mso-width-source:userset;mso-width-alt:2176;width:51pt'>
 <col width=72 style='width:54pt'>
 <col width=73 style='mso-width-source:userset;mso-width-alt:2336;width:55pt'>
 <col width=67 style='mso-width-source:userset;mso-width-alt:2144;width:50pt'>
 <col width=78 style='mso-width-source:userset;mso-width-alt:2496;width:59pt'>
 <col width=75 style='mso-width-source:userset;mso-width-alt:2400;width:56pt'>
 <col width=82 style='mso-width-source:userset;mso-width-alt:2624;width:62pt'>
 <col width=80 style='mso-width-source:userset;mso-width-alt:2560;width:60pt'>
 <tr height=43 style='mso-height-source:userset;height:32.25pt'>
  <td colspan=13 height=43 class=xl37 width=981 style='height:32.25pt;
  width:737pt'>主要物资收、发、存统计表</td>
 </tr>
 <tr height=43 style='mso-height-source:userset;height:32.25pt'>
  <td height=43 class=xl29 style='height:32.25pt'>物资名称</td>
  <td class=xl29 style='border-left:none'>规格</td>
  <td class=xl29 style='border-left:none'>单位</td>
  <td class=xl31 width=60 style='border-left:none;width:45pt'>上期<br>
    结存</td>
  <td class=xl31 width=69 style='border-left:none;width:52pt'>本期<br>
    购进</td>
  <td class=xl31 width=68 style='border-left:none;width:51pt'>累计<br>
    购进</td>
  <td class=xl31 width=72 style='border-left:none;width:54pt'>本期<br>
    耗用</td>
  <td class=xl31 width=73 style='border-left:none;width:55pt'>累计<br>
    耗用</td>
  <td class=xl31 width=67 style='border-left:none;width:50pt'>本期<br>
    结存</td>
  <td class=xl31 width=78 style='border-left:none;width:59pt'>本期<br>
    盈亏</td>
  <td colspan=3 class=xl29 style='border-left:none'>备注</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl28 style='height:20.1pt;border-top:none'>原料：</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl24 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>其中<span
  style='mso-spacerun:yes'>&nbsp; </span>套管J55</td>
  <td class=xl26 style='border-top:none;border-left:none'>139.7×7.72</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料期初库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管料期末库存 %></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>套管接箍管</td>
  <td class=xl26 style='border-top:none;border-left:none'>153.67×13</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料期初库存 %></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管接篐料期末库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr> 
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>套管N80Q</td>
  <td class=xl26 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料期初库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80料期末库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>套管N80Q接箍管</td>
  <td class=xl26 style='border-top:none;border-left:none'>&nbsp;</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料期初库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管N80接篐料期末库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>油管</td>
  <td class=xl26 style='border-top:none;border-left:none'>73×5.51</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料期初库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管料期末库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>油管接箍管</td>
  <td class=xl26 style='border-top:none;border-left:none'>88.90×12.5</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料期初库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料本期外购量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料本期外购量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料本期消耗量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料本期消耗量累计%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=油管接篐料期末库存%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl30 style='height:20.1pt;border-top:none'>辅料：</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>油管保护环</td>
  <td class=xl27 style='border-top:none;border-left:none'>2-7/8</td>
  <td class=xl24 style='border-top:none;border-left:none'>套</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl34 style='border-right:.5pt solid black;border-left:
  none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>套管保护环</td>
  <td class=xl27 style='border-top:none;border-left:none'>5-1/2</td>
  <td class=xl24 style='border-top:none;border-left:none'>套</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管螺纹保护器本期购进%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管螺纹保护器本期累计购进%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl34 style='border-right:.5pt solid black;border-left:
  none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>外购套管成品接箍J55</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>支</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍期初库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍本期外购量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍本期外购量累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍本期消耗量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍本期消耗量累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管接箍期末库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none;font-size:14px'>外购套管成品接箍N80Q</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>支</td>
   <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍期初库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍本期外购量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍本期外购量累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍本期消耗量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍本期消耗量累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=成品套管N80接箍期末库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>自产套管接箍</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>支</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍期初库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍本期外购量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍本期外购量累计 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍本期消耗量 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍本期消耗量累计 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产套管接箍期末库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>自产油管接箍</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>支</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍期初库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍本期外购量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍本期外购量累计 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍本期消耗量 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍本期消耗量累计 %></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=自产油管接箍期末库存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td colspan=3 class=xl32 style='border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl30 style='height:20.1pt;border-top:none'>成品：</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td colspan=2 class=xl24 style='border-left:none'>上期结存</td>
  <td colspan=2 class=xl24 style='border-left:none'>本期入库</td>
  <td colspan=2 class=xl24 style='border-left:none'>本期发货</td>
  <td colspan=2 class=xl24 style='border-left:none'>本期销售</td>
  <td colspan=2 class=xl24 style='border-left:none'>本期结存</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl28 style='height:20.1pt;border-top:none'>　</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>入库量</td>
  <td class=xl24 style='border-top:none;border-left:none'>销售量</td>
  <td class=xl24 style='border-top:none;border-left:none'>当月</td>
  <td class=xl24 style='border-top:none;border-left:none'>累计</td>
  <td class=xl24 style='border-top:none;border-left:none'>当月</td>
  <td class=xl24 style='border-top:none;border-left:none'>累计</td>
  <td class=xl24 style='border-top:none;border-left:none'>当月</td>
  <td class=xl24 style='border-top:none;border-left:none'>累计</td>
  <td class=xl24 style='border-top:none;border-left:none'>实际结存</td>
  <td class=xl24 style='border-top:none;border-left:none'>销售结存</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>套管</td>
  <td class=xl26 style='border-top:none;border-left:none'>139.7×7.72</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管上期结存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期入库%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期入库累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期发货 %>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期发货累计 %>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期销售量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本年销售量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期结存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
 </tr> 
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>油管</td>
  <td class=xl26 style='border-top:none;border-left:none'>73×5.51</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管上期结存%></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期入库%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期入库累计%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期发货%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期发货累计%>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期销售量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本年销售量%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=油管本期结存 %></td>
  <td class=xl33 style='border-top:none;border-left:none'>　</td>
 </tr>
 <tr height=26 style='mso-height-source:userset;height:20.1pt'>
  <td height=26 class=xl29 style='height:20.1pt;border-top:none'>合计</td>
  <td class=xl25 style='border-top:none;border-left:none'>　</td>
  <td class=xl24 style='border-top:none;border-left:none'>吨</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=(套管上期结存 + 油管上期结存)%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=(套管本期入库 + 油管本期入库)%></td>
  <td class=xl33 style='border-top:none;border-left:none'><%=(套管本期入库累计 + 油管本期入库累计)%>　</td>
  <td class=xl32 style='border-top:none;border-left:none'><%=(套管本期发货  + 油管本期发货)%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=(套管本期发货累计 + 油管本期发货累计)%>　</td>
  <td class=xl33 style='border-top:none;border-left:none'><%=套管本期销售量 + 油管本期销售量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=套管本年销售量 + 油管本年销售量%></td>
  <td class=xl32 style='border-top:none;border-left:none'><%=(套管本期结存+油管本期结存)%></td>
  <td class=xl32 style='border-top:none;border-left:none'>　</td>
 </tr>
 <tr height=31 style='mso-height-source:userset;height:23.25pt'>
  <td colspan=2 height=31 class=xl38 style='height:23.25pt'>
  <form id=form2 method=post name=form1 action=工贸产量.aspx>
  统计负责人： 廉宝仁
  </form>
  </td>
  <td colspan=8 style='mso-ignore:colspan'></td>
  <td colspan=3 class=xl38>填报人：谷立凤</td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=148 style='width:111pt'></td>
  <td width=80 style='width:60pt'></td>
  <td width=29 style='width:22pt'></td>
  <td width=60 style='width:45pt'></td>
  <td width=69 style='width:52pt'></td>
  <td width=68 style='width:51pt'></td>
  <td width=72 style='width:54pt'></td>
  <td width=73 style='width:55pt'></td>
  <td width=67 style='width:50pt'></td>
  <td width=78 style='width:59pt'></td>
  <td width=75 style='width:56pt'></td>
  <td width=82 style='width:62pt'></td>
  <td width=80 style='width:60pt'></td>
 </tr>
 <![endif]>
</table>
</div>

    </form>
      <script>          parent.hidesubmenu(true);</script>
</body>
</html>
